#pragma once

#ifndef _DiamondSquare_h_
#define _DiamondSquare_h_

#include "..\Generator.h"
#include <d3dx9math.h>

namespace MyGame {

class DiamondSquare : public Generator {
public:
    DiamondSquare(void);
    virtual ~DiamondSquare(void);
    FLOAT GetDisplacement() const;
    void SetDisplacement(FLOAT val);
    FLOAT GetMidpointDisplacement() const;
    void SetMidpointDisplacement(FLOAT val);
    virtual void Generate(HeightMap* heightMap);
private:
    FLOAT displacement;
    FLOAT** map;
    FLOAT midpointDisplacement;
    void Generate(int x1, int y1, int x2, int y2);
};

}

#endif
